import request from '@/utils/request'

export function getUserList(params) {
  return request({
    url: '/userList',
    params
  })
}

export function addUserData(data) {
  return request({
    url: '/userList',
    data,
    method: 'POST'
  })
}

export function delUserData(uid) {
  return request({
    url: `/userList/${uid}`,
    method: 'DELETE'
  })
}

export function editUserData(data) {
  return request({
    url: `/userList/${data.id}`,
    method: 'PATCH',
    data
  })
}

export function getRightList() {
  return request({
    url: '/rightList'
  })
}
